/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package PackageUpdater.Config;

import java.io.*;

/**
 *
 * @author wcss
 */
public class SysConfig 
{
   private String updateListUrl = "";
   private int nowUpdateIndex = 0;
   private String softName = "";
   private String homepage = "";
   private String Maintainer = "";
   private String updateLogUrl = "";
   private String softwareWorkspace = "";
   private String appStartupScript = "";
   private String startupLogoFile = "";
   
   public static SysConfig load(String path) throws Exception {
        if (new File(path).exists()) {
            return (SysConfig) ObjectToXMLUtil.loadObjectFromXml(path);
        } else {
            return null;
        }
    }

    public static void save(SysConfig entry, String path) throws Exception {
        ObjectToXMLUtil.saveObjectToXml(entry, path);
    }

    /**
     * @return the updateListUrl
     */
    public String getUpdateListUrl() {
        return updateListUrl;
    }

    /**
     * @param updateListUrl the updateListUrl to set
     */
    public void setUpdateListUrl(String updateListUrl) {
        this.updateListUrl = updateListUrl;
    }

    /**
     * @return the nowUpdateIndex
     */
    public int getNowUpdateIndex() {
        return nowUpdateIndex;
    }

    /**
     * @param nowUpdateIndex the nowUpdateIndex to set
     */
    public void setNowUpdateIndex(int nowUpdateIndex) {
        this.nowUpdateIndex = nowUpdateIndex;
    }

    /**
     * @return the softName
     */
    public String getSoftName() {
        return softName;
    }

    /**
     * @param softName the softName to set
     */
    public void setSoftName(String softName) {
        this.softName = softName;
    }

    /**
     * @return the homepage
     */
    public String getHomepage() {
        return homepage;
    }

    /**
     * @param homepage the homepage to set
     */
    public void setHomepage(String homepage) {
        this.homepage = homepage;
    }

    /**
     * @return the Maintainer
     */
    public String getMaintainer() {
        return Maintainer;
    }

    /**
     * @param Maintainer the Maintainer to set
     */
    public void setMaintainer(String Maintainer) {
        this.Maintainer = Maintainer;
    }

    /**
     * @return the updateLogUrl
     */
    public String getUpdateLogUrl() {
        return updateLogUrl;
    }

    /**
     * @param updateLogUrl the updateLogUrl to set
     */
    public void setUpdateLogUrl(String updateLogUrl) {
        this.updateLogUrl = updateLogUrl;
    }

    /**
     * @return the softwareWorkspace
     */
    public String getSoftwareWorkspace() {
        return softwareWorkspace;
    }

    /**
     * @param softwareWorkspace the softwareWorkspace to set
     */
    public void setSoftwareWorkspace(String softwareWorkspace) {
        this.softwareWorkspace = softwareWorkspace;
    }

    /**
     * @return the appStartupScript
     */
    public String getAppStartupScript() {
        return appStartupScript;
    }

    /**
     * @param appStartupScript the appStartupScript to set
     */
    public void setAppStartupScript(String appStartupScript) {
        this.appStartupScript = appStartupScript;
    }

    /**
     * @return the startupLogoFile
     */
    public String getStartupLogoFile() {
        return startupLogoFile;
    }

    /**
     * @param startupLogoFile the startupLogoFile to set
     */
    public void setStartupLogoFile(String startupLogoFile) {
        this.startupLogoFile = startupLogoFile;
    }
    
}
